package com.shiminghui;

import java.util.Random;

public class JiaoHuan {
    public static void main(String[] args) {

        Random random = new Random();
        int arr[]=new int[10];
        for (int i = 0; i < arr.length; i++) {
            arr[i]=random.nextInt(10)+1;
            System.out.print(arr[i]+"\t");
        }
        System.out.println();

        for (int i = 0; i < arr.length/2; i++) {
            int temp = 0;
            temp= arr[i];
            arr[i]=arr[arr.length-i-1];
            arr[arr.length-i-1]=temp;
        }

        for (int i = 0; i < arr.length; i++) {
            System.out.print(arr[i]+"\t");
        }


    }
}
